<style>
	.btn.btn-success {
		background: #6499fa;
	}
</style>
<div class='fui-page fui-page-current'>
    <div class="fui-content">
		<div class="topbg" style="position: relative;width:100%;background: {{main.syscolor || '#7c1cc9'}};height:6rem">
			<div class="fui-cell-title bold" style="padding-top:0.8rem;color:#fff">银行卡绑定</div>
			<div style="padding-left:0.7rem;font-size:0.6rem">
				<p style="color:#f2f2f2">{{pagedata.account.title}}承诺身份信息仅限提现使用，</p>
				<p style="color:#f2f2f2">不会向任何人泄露用户个人信息。</p>
			</div>
		</div>
		<div style="padding:0.5rem;margin-top:-2rem">
		<div class='fui-cell-group' ng-if="!pagedata.item.id || pagedata.item.upcan">
			<div class="fui-cell">
                <div class="fui-cell-label">真实姓名</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="真实姓名" ng-model="pagedata.item.realname"/></div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">身份证号码</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="身份证号码" ng-model="pagedata.item.cardnum"/></div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label" style="width:auto">证件长期有效？</div>
                <div class="fui-cell-info r">
				<input class="weui_switch" type="checkbox" ng-checked="pagedata.item.post_data.timetype=='1'" ng-click="toogle(pagedata.item.post_data,'timetype',[0,1])">
				</div>
            </div>
			<div class="fui-cell" ng-if="pagedata.item.post_data.timetype!=1">
                <div class="fui-cell-label">证件有效期（起始）</div>
                <div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.year1" class="form-control tpl-province">
					<option value="" selected="selected">年</option>
					<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.item.post_data.year1==value">{{value}}</option>
					</select>
				</div>
				<div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.month1" class="form-control tpl-city">
					<option value="" selected="selected">月</option>
					<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.item.post_data.month1==value">{{value}}</option>
					</select>
				</div>
				<div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.day1" class="form-control tpl-district">
					<option value="" selected="selected">日</option>
					<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.item.post_data.year1,pagedata.item.post_data.month1,value)" value="{{value}}" ng-selected="pagedata.post.birth.day1==value">{{value}}</option>
					</select>
				</div>
            </div>
			<div class="fui-cell" ng-if="pagedata.item.post_data.timetype!=1">
                <div class="fui-cell-label">证件有效期（截止）</div>
                <div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.year2" class="form-control tpl-province">
					<option value="" selected="selected">年</option>
					<option ng-repeat="value in pagedata.years2" value="{{value}}" ng-selected="pagedata.item.post_data.year2==value">{{value}}</option>
					</select>
				</div>
				<div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.month2" class="form-control tpl-city">
					<option value="" selected="selected">月</option>
					<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.item.post_data.month2==value">{{value}}</option>
					</select>
				</div>
				<div class="fui-cell-label" style="width:28%">
					<select ng-model="pagedata.item.post_data.day2" class="form-control tpl-district">
					<option value="" selected="selected">日</option>
					<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.item.post_data.year2,pagedata.item.post_data.month2,value)" value="{{value}}" ng-selected="pagedata.post.birth.day2==value">{{value}}</option>
					</select>
				</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">银行名称</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="银行名称" ng-model="pagedata.item.bankname"/></div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">银行卡号</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="银行卡号" ng-model="pagedata.item.bankcard"/></div>
            </div>
			<div class="fui-cell">
				<div class="fui-cell-label">银行城市</div>		
				<div class="fui-cell-info" style="padding-right:0.2rem">
					<select ng-model="pagedata.item.pcd.province" class="form-control tpl-province">
					<option value="" selected="selected">省份</option>
					<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.item.pcd.province==value">{{value}}</option>
					</select>
				</div>
				<div class="fui-cell-info">
					<select ng-model="pagedata.item.pcd.city" class="form-control tpl-city">
					<option value="" selected="selected">城市</option>
					<option ng-repeat="(value,data) in pagedata.province[pagedata.item.pcd.province]" value="{{value}}" ng-selected="pagedata.item.pcd.city==value">{{value}}</option>
					</select>
				</div>
			</div>
			<div class="fui-cell">
                <div class="fui-cell-label">银行手机号</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="银行卡绑定手机号" ng-model="pagedata.item.mobile"/></div>
            </div>
		</div>
		<div class='fui-cell-group' ng-if="pagedata.item.id && !pagedata.item.upcan">
			<div class="fui-cell">
                <div class="fui-cell-label">真实姓名</div>
                <div class="fui-cell-info">{{pagedata.item.realname}}</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">银行卡号</div>
                <div class="fui-cell-info">{{pagedata.item.bankcard}}</div>
            </div>
		</div>
		</div>
		<a ng-if="!pagedata.item.id || pagedata.item.upcan" href="javascript:;" class='btn btn-success block' style="line-height: 2.6;" ng-click="post(pagedata.item,'core/member.bankup/post/')">确认提交</a>
		<a ng-if="pagedata.item.passed==1" href="javascript:;" class='btn btn-success block' style="line-height: 2.6;" ng-click="pagedata.item.upcan=true">修改绑卡</a>
		<a ng-if="pagedata.item.id>0 && pagedata.item.passed!=1 && !pagedata.item.upcan" href="javascript:;" class='btn btn-success block' style="line-height: 2.6;" ng-click="pagedata.item.upcan=true">绑卡失败（重新提交）</a>
	</div>
</div>
<script>
scope.pagedata.getprovince=function(){
	scope.get('core/member.set/getprovince/',function(res){
		scope.pagedata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>